﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewsReader.aspx.cs" Inherits="HOBA.AjaxDemo.NewsReader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>News</title>
        <meta http-equiv="Content-Language" content="en-us" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="author" content="HOBA team - Ibelis corp" />
		<meta name="description" content="HOBA projects" />
		<meta name="keywords" content="ajax, jquery, javascript, news, ibelis, hoba, hat cat, uit, is, tran thanh tung" />
		<meta name="robots" content="index, follow" />
	    <meta name="Googlebot" content="archive" />
	    <meta http-equiv="cache-control" content="public" />
        <link rel="Stylesheet" href="../css/AjaxDemo.css" />
        <script type="text/javascript" src="../scripts/jquery.js"></script>
        <script type="text/javascript" src="../scripts/TestAjax_script.js"></script>
        <script type="text/javascript" src="../tinymce/tiny_mce.js"></script>
    </head>
    <body>
        <div class="header">
            <h1>HOBA project - Ajax demo using jQuery</h1>
        </div>
        
        <div class="rearpanel">
        </div>
        
        <div class="mainpanel">
            <div id="news">
                <h1 id="news_header" runat="server"></h1>
                <span id="news_info_1"  runat="server"></span>
                <div class="clear"></div>
                <div id="news_image"  runat="server"></div>
                <div id="news_description"  runat="server"></div>
                <span id="news_content"  runat="server"></span>
                <span id="news_info_2"  runat="server"></span>
                <div class="clear"></div>
                <span id="news_info_3" runat="server"></span>
                <div class="clear"></div>
                <input type="button" id="update" value="Update this news" onclick="showUpdateForm();" />
            </div>
            
            <form id="form1" method="post" action="" runat="server">
                <input type="hidden" id="path" value="" runat="server" />
                <div id="lblTitle">Title</div>
                <asp:TextBox id="txtNewTitle" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="This fields could not be empty" ControlToValidate="txtNewTitle"></asp:RequiredFieldValidator>
                <div class="clear"></div>
                
                <div id="lblImage">Image</div>
                <asp:TextBox ID="txtNewImage" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Text="This fields could not be empty" ControlToValidate="txtNewImage"></asp:RequiredFieldValidator>
                <div class="clear"></div>
                
                <div id="lblDescription">Description</div>
                <asp:TextBox ID="txtNewDescription" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Text="This fields could not be empty" ControlToValidate="txtNewImage"></asp:RequiredFieldValidator>
                <div class="clear"></div>
                
                <div id="lblAuthor">Author</div>
                <asp:TextBox ID="txtNewAuthor" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Text="This fields could not be empty" ControlToValidate="txtNewAuthor"></asp:RequiredFieldValidator>
                <div class="clear"></div>
                
                <div id="lblSource">Source</div>
                <asp:TextBox ID="txtNewSource" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Text="This fields could not be empty" ControlToValidate="txtNewSource"></asp:RequiredFieldValidator>
                <div class="clear"></div>
                
                <!-- tinyMCE editor -->
                <div id="editor">
                    <script type="text/javascript">
                        tinyMCE.init({
                            // General options
                            mode: "textareas",
                            theme: "advanced",
                            width: "100%",
                            height: "100%",
                            plugins: "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

                            // Theme options
                            theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
                            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
                            theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
                            theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
                            theme_advanced_toolbar_location: "top",
                            theme_advanced_toolbar_align: "left",
                            theme_advanced_statusbar_location: "bottom",
                            theme_advanced_resizing: true,

                            // Skin options
                            skin: "o2k7",
                            //skin_variant: "silver",

                            // Example content CSS (should be your site CSS)
                            //content_css: "css/example.css",
                            //body_class: "autosize",

                            // Drop lists for link/image/media/template dialogs
                            template_external_list_url: "js/template_list.js",
                            external_link_list_url: "js/link_list.js",
                            external_image_list_url: "js/image_list.js",
                            media_external_list_url: "js/media_list.js",

                            // Replace values for the template plugin
                            template_replace_values: {
                                username: "Some User",
                                staffid: "991234"
                            }
                        });
                    </script>
                    <textarea id="editor_content"></textarea>
                    <input type="button" id="btnReset" value="Cancel" class="right" onclick="resetForm();" />
                    <input type="button" id="btnSubmit" value="Save" class="right" onclick="updateNews();" />
                </div>
           </form>
        </div>
        
        <div class="rearpanel">
        </div>
        
        <div class="footer">
            <h4>© Copyright 2007-2011 <a href="http://www.ibelis.vn/" target="_blank">Ibelis Corporation</a>. An internship project by HOBA team.</h4>
        </div>
    </body>
</html>
